package tw.com.hitevision.whiteboard.android.retrofit.response.youtube;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

public class VideoSnippet implements Parcelable {
    @SerializedName(value = "publishedAt")
    public String publishedAt;
    @SerializedName(value =  "channelId")
    public String channelId;
    @SerializedName(value = "title")
    public String title;
    @SerializedName(value = "description")
    public String description;
    @SerializedName(value = "thumbnails")
    public VideoSnippetThumbs thumbnails;
    @SerializedName(value = "channelTitle")
    public String channelTitle;
    @SerializedName(value = "categoryId")
    public String categoryId;
    @SerializedName(value = "defaultLanguage")
    public String defaultLanguage;
    @SerializedName(value = "defaultAudioLanguage")
    public String defaultAudioLanguage;

    protected VideoSnippet(Parcel in) {
        publishedAt = in.readString();
        channelId = in.readString();
        title = in.readString();
        description = in.readString();
        channelTitle = in.readString();
        categoryId = in.readString();
        defaultLanguage = in.readString();
        defaultAudioLanguage = in.readString();
    }

    public static final Creator<VideoSnippet> CREATOR = new Creator<VideoSnippet>() {
        @Override
        public VideoSnippet createFromParcel(Parcel in) {
            return new VideoSnippet(in);
        }

        @Override
        public VideoSnippet[] newArray(int size) {
            return new VideoSnippet[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(publishedAt);
        dest.writeString(channelId);
        dest.writeString(title);
        dest.writeString(description);
        dest.writeString(channelTitle);
        dest.writeString(categoryId);
        dest.writeString(defaultLanguage);
        dest.writeString(defaultAudioLanguage);
    }
}
